<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c"%>
<%
	String path = request.getContextPath();
%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>付款项统计</title>
<style type="text/css">
    .searchArea .fieldBox .label{width: 150px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;text-align:center;}
</style>
<jsp:include page="../../import.jsp" flush="true" />
</head>
<body class="iframeBody">
<div class="Wrapper">
	<div class="searchArea">
            <form id="archivesInfo_form">
                <div class="fieldset1 clearFix">
                    <div class="fieldBox col_100">
                    	
						<div style="width: 100%; ">
							<table style="BORDER-COLLAPSE: collapse;margin-bottom:20px" borderColor=#ECECEC height=40 cellPadding=1 width="100%" align=center border=1> 
							<thead>
								<tr style="background:#E7FEF4">
									<th  style="text-align: center;width:5%;"></th>
									<th  style="text-align: center;width:10%">应还款项</th>
									<th  style="text-align: center;width:10%">本次还款额</th>
									<th  style="text-align: center;width:15%">机构收款账户</th>
									<th  style="text-align: center;width:15%">我司付款账户</th>
									<th  style="text-align: center;width:20%">付款单备注</th>
								</tr>
							</thead>
							<tbody>
								<c:forEach items="${payDLst}" var="item" varStatus="status">
									<tr>
									<td  style="text-align: center; height:20px;">${status.index+1}</td>
									<td  style="text-align: left; ">${item.COST_NM }</td>
									<td  style="text-align: right; ">${item.ACTUAL_AMT }</td>
									<td  style="text-align: left; ">${raccno }</td>
									<td  style="text-align: left; ">${paccno }</td>
									<td  style="text-align: left; "><input type="text" class="ui-textbox" name="${item.ID}" id="${item.ID}" value="${item.FEE_REM }"/></td>
									
									</tr>
								</c:forEach>
							</tbody>
							</table>
						</div>
	                </div>
                 </div>
            </form>
     </div>
</div>


<script type="text/javascript">
$(function(){
	//加载数据
	$('#archivesInfo_form').ligerForm({
	        validate : true
	});
    SET_popupIframeHeight();
});

//定义父级调用事件
frameElement.dialog.onOk = function () {
	check();
}
           
frameElement.dialog.onCancel = function () {
     frameElement.dialog.close();
}

function check(){
	var ligerForm = liger.get("archivesInfo_form");
	//alert(JSON.stringify(ligerForm.getData()));
	var data = {"jsondata":JSON.stringify(ligerForm.getData())};
	
	$.ajax({
  	   type: "POST",
 	   url: "<%=path%>/rfbase/fncprjpaysch/savecheckRepay.do",
		dataType: 'json',
		data: data,
		beforeSend: function(){
			wait_dialog=$.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING ,SQ_type: "waitting" });
		},
	 	  success:function(msg){
				wait_dialog.close();
				if(msg.success == 1){
					$.ligerDialog.SQalert({content: msg.info,SQ_type: "success"});
						//if(id == "") {
							//Remove_navTab();//新增，关闭当前页面
						//}
					window.location.reload();
				}else{
					$.ligerDialog.SQalert({content: msg.info,SQ_type: "error"});
				}
			},error:function (XMLHttpRequest, textStatus, errorThrown) { 
				wait_dialog.close();
				$.ligerDialog.SQalert({content: "网络错误，请稍后重试",SQ_type: "error"});
			} 
 	});
	
	frameElement.dialog.close();
}

</script>



</body>
</html>
